package main

import "fmt"

func main() {
	// for r
	println("for r 循环的使用：")
	s1 := [3]int{}
	for index, value := range s1 {
		fmt.Printf("index: %d, value: %d \n", index, value)
	}

	// for i
	println("for i 循环的使用")
	sum := 0
	for i := 1; i <= 100; i++ {
		sum = sum + i
	}
	fmt.Printf("Total is %d \n", sum)
}
